package itheima.com.HashSetTest;

import itheima.com.MyTree.Student;

import java.util.HashSet;

public class HashSetDemo01 {
    public static void main(String[] args) {
        HashSet<Student> hs = new HashSet<>();
        Student s1 = new Student("玲玲",99,97,100);
        Student s2 = new Student("明明",95,97,100);
        Student s3 = new Student("花花",91,95,93);
        Student s6 = new Student("花花",91,95,93);
        Student s4 = new Student("可可",96,100,90);
        Student s5 = new Student("可可",96,100,90);

        hs.add(s1);
        hs.add(s2);
        hs.add(s3);
        hs.add(s4);
        hs.add(s5);

        for (Student student : hs) {
            System.out.println(student);
        }
    }
}
